﻿<UserControl x:Class="PhotoKiosk.View.SystemSettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:resx="clr-namespace:PhotoKiosk.Properties"
             mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="1366" Foreground="White">
    <DockPanel>
        <Button DockPanel.Dock="Bottom" Content="{x:Static resx:Resources.Restart_Application}" Command="{Binding ReturnCommand}" Margin="10" Background="#FF4C7D99" Height="60" Width="180" VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition Width="40" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="40" />
            </Grid.ColumnDefinitions>
                <GroupBox Grid.Column="7" Header="{x:Static resx:Resources.Languages}" FontSize="25" >
                    <GroupBox.Style>
                        <Style TargetType="{x:Type GroupBox}">
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type GroupBox}">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="Auto" />
                                                <RowDefinition Height="*" />
                                            </Grid.RowDefinitions>
                                            <Border Grid.Row="0" BorderThickness="1" BorderBrush="{TemplateBinding Background}" Background="{TemplateBinding Background}">
                                                <Label Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Center">
                                                    <ContentPresenter ContentSource="Header" RecognizesAccessKey="True" />
                                                </Label>
                                            </Border>
                                            <Border Grid.Row="1" BorderThickness="1,0,1,1" BorderBrush="{TemplateBinding Background}">
                                                <ContentPresenter Margin="4" />
                                            </Border>
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="White"/>
                            <Setter Property="Background" Value="#55000000"/>
                        </Style>
                    </GroupBox.Style>
                    <ItemsControl ItemsSource="{Binding LanguageButtonViewModels, Mode=OneWay}"/>
                </GroupBox>
                <StackPanel Grid.Column="5" Orientation="Vertical" Background="#55000000">
                    <Label Content="Reception settings" Foreground="White" HorizontalAlignment="Center" FontSize="25"/>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <CheckBox Content="{x:Static resx:Resources.Print_Reception}" IsChecked="{Binding Path=PrintReception, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0,10,0"/>

                    <Separator Height="2" Margin="10,5,10,5"/>
                    <Button Content="{x:Static resx:Resources.Open_Reception_Template}" Command="{Binding OpenReceptionTemplateCommand}" Height="30" FontSize="15"  Background="#883D7CBB" Margin="10,0,10,0"/>
                    <Separator Height="2" Margin="10,5,10,5"/>
                </StackPanel>

                <StackPanel Grid.Column="3" Orientation="Vertical" Background="#55000000">
                    <Label Content="{x:Static resx:Resources.Paper_Sizes}" Foreground="White" HorizontalAlignment="Center" FontSize="25"/>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <DataGrid  ItemsSource="{Binding PaperSizes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalContentAlignment="Center" AutoGenerateColumns="True" HorizontalAlignment="Stretch" VerticalAlignment="Top" FontSize="18" Background="White" Margin="10,0,10,0"/>
                <Button Content="{x:Static resx:Resources.Save}" Command="{Binding PaperSizesSaveCommand}" Margin="10,10,10,0" HorizontalAlignment="Stretch" Height="30" Background="#883D7CBB"/>

                </StackPanel>

                <StackPanel Grid.Column="1" Orientation="Vertical" Background="#55000000">
                    <Label Content="{x:Static resx:Resources.Kiosk_Info}" Foreground="White" HorizontalAlignment="Center" FontSize="25"/>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Kiosk_ID}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding KioskId, Mode=TwoWay}" Width="100" FontSize="15" Margin="10,0,0,0"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Next_Order_Id}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding NextOrderId, Mode=TwoWay}" Width="100" FontSize="15" Margin="10,0,0,0"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.EnterSystemCode}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding SystemCloseCode}" Width="100" FontSize="15" Margin="10,0,0,0"/>
                        <Button Content="{x:Static resx:Resources.Save}" Command="{Binding SystemCloseCodeSaveCommand}" Height="30" Width="100" FontSize="15" Margin="10,0,0,0" Background="#883D7CBB"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Order_Location_Save}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding OrderLocationSave}" Width="200" FontSize="15" Margin="10,0,0,0" IsReadOnly="True"/>
                        <Button Content="{x:Static resx:Resources.Change}" Command="{Binding ChangeOrderLocationSaveCommand}" Height="30" Width="100" FontSize="15" Margin="10,0,0,0" Background="#883D7CBB"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Button Content="{x:Static resx:Resources.Open_Sample_Photos_Folder}" Command="{Binding OpenSamplePhotosLocationCommand}" Height="30" Width="250" FontSize="15"  Background="#883D7CBB"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Order_Miminum_Price}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding OrderMiminumPrice, Mode=TwoWay}" Width="68" FontSize="15" Margin="10,0,0,0" HorizontalContentAlignment="Center"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Image_Extension}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding ImageExtension}" Width="100" FontSize="15" Margin="10,0,0,0"/>
                    </StackPanel>
                    <Separator Height="2" Margin="10,5,10,5"/>
                    <StackPanel Orientation="Horizontal" Margin="10,0,10,0">
                        <Label Content="{x:Static resx:Resources.Image_Extensions_Accepted_By_Printer}" Foreground="White" FontSize="15"/>
                        <TextBox Text="{Binding ImageExtensionsAcceptedByPrinter}" Width="100" FontSize="15" Margin="10,0,0,0"/>
                    </StackPanel>
                </StackPanel>
        </Grid>
    </DockPanel>
</UserControl>
